{extend name="public/base" /}{block name="body"}
<div class="ibox float-e-margins">
	<div class="content-tabs">
		<ol class="breadcrumb">
			<li>
				<a href="{:url('index/index')}"><i class="fa fa-home"></i></a>
			</li>
			<li><strong>商家广告列表</strong></li>
		</ol>
    </div>
	<div class="ibox-content">
		<form id="myForm" class="form-horizontal m-t" method="post" action="{:url('index')}">
		    <div class="row">
					<div class="form-group" style="padding-left: 50px;">
						标题 <input type="text" id="title" name="title" value="" placeholder="请输入标题"  class="bank"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						商家 <input type="text" id="store_name" name="store_name" value="" placeholder="请输入商户名称" class='bank' />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				    	时间 <input id='add_time' name='add_time' onclick='WdatePicker()' type='text' placeholder="开始时间"  class='bank'/>
						<input id='end_time' name='end_time'  onclick='WdatePicker()' type='text' placeholder="结束时间" class='bank'/>
						<input type='hidden' name="end_time"  value="2017-4-1" >
						<span class="bank" style="border-radius:0px;border:1px;"><button type="submit" class="btn btn-sm btn-primary"><li class="fa fa-search"> 查询</li></button> </span>
					</div> 
        	</div>
        </form>
		<div class="hr-line-dashed"></div>
            <div class="example-wrap">
                <div class="example">
                    <table class="table table-bordered table-hover">
                        <thead>
                            <tr class="long-tr">
                                <th>ID</th>
                                <th>图片</th>
                                <th>标题</th>
                                <th>商家</th>
                                <th>跳转url</th>
                                <th>时间</th>
                                <th>浏览量</th>
								<th>排序</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody id="list">
                        	{volist name="list" id='ad'}
                        	<tr>
                        		<td>{$ad.id}</td>
                        		<td><img src="{$ad.thumb}"  width="50px"/></td>
                        		<td>{$ad.title}</td>
                        		<td>{$ad.store_name}</td>
                        		<td>{$ad.url}</td>
                        		<td>{$ad.add_time}</td>
                        		<td>{$ad.click}</td>
                        		<td>{$ad.sort}</td>
                        		<td>	
                        			<a href="{:url('edit',['id'=>$ad.id])}" class="btn btn-primary bnt-sm">
										<i class="fa fa-paste"></i> 编辑</a>&nbsp;&nbsp; 	
									<a href="{:url('delete',['id'=>$ad.id])}" class="btn btn-danger bnt-sm ajax-delete">
										<i class="fa fa-trash-o"></i> 删除</a>
                        		</td>
                        	</tr>
                        	{/volist}
                        </tbody>
                    </table>
                    <div style="text-align: right;">
                      {$list->render()}
                    </div>
                </div>
            </div>
            </div>
</div>
{/block} {block name="script"}
<script src="__LIB__/datepicker/WdatePicker.js"></script>
<script>
</script>
<style>
.bank{
	width: 150px;
    height:30px;   
    text-align:center;
    border-radius:5px;
}

   
</style>
{/block}